<template>
  <div class="home">
    <van-search v-model="value" placeholder="请输入搜索关键词" />
    <banner-view :banner="home.banner" />
    <channel-view :channel="home.channel" />
    <coupon-list :couponList="home.couponList" />
    <grouponList />
    <brand-list :brandList="home.brandList" />
    <new-goods-list :newGoodsList="home.newGoodsList" />
    <hot-goods-list :hotGoodsList="home.hotGoodsList" />
    <topic-list :topicList="home.topicList" />
  </div>
</template>
 
<script setup>
import bannerView from './banner.vue'
import channelView from './channel.vue'
import couponList from './couponList.vue'
import grouponList from './grouponList.vue'
import brandList from './brandList.vue'
import newGoodsList from './newGoodsList.vue'
import hotGoodsList from './hotGoodsList.vue'
import topicList from './topicList.vue'
import { useHomeStore } from '../../stores/index'
import { onMounted } from 'vue'
let home = useHomeStore()
onMounted(async () => {
  await home.fetchGetHome()
  // console.log(home.banner)
});

</script>

<style scoped>
.home {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto;
  overflow: scroll;
  background-color: #f2f2f2;
  /* border: 1px solid #000; */
}
</style>
